/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package define;

import java.util.List;
import java.util.ArrayList;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author RoderickNestor
 */
@XmlRootElement(name = "classdefine")
public class ClassDefine {

    public String name = "";
    public String params = "";

    public List<AttributeDefine> atrrs = new ArrayList<>();

    public List<TemplateDefine> templates = new ArrayList<>();

    public List<PartialDefine> partials = new ArrayList<>();

    public List<PartialDefine> getPartialForTemplate(String name) {
        List<PartialDefine> p = new ArrayList<>();
        for (PartialDefine partial : partials) {
            if(partial.tpl.equals(name)){
                p.add(partial);
            }
        }
        return p;
    }
}
